Skip to content

Comments

Add randkey for krb api#924

Merged
rimu-stack merged 12 commits intodevfrom
add_randkey_for_krb_api_1225
Feb 19, 2026
Merged

Add randkey for krb api#924
rimu-stack merged 12 commits intodevfrom
add_randkey_for_krb_api_1225

Conversation

@Misha-Shvets
Copy link
Collaborator

@Misha-Shvets Misha-Shvets commented Feb 3, 2026

Добавление функционала в работу с kadmin_api

в ktadd был добавлен атрибут is_rand_key
изменил создание принципала и модификацию. теперь это post и put соответственно по урлу /principal
в kadmind добавленпа обработка algorithms

@Misha-Shvets Misha-Shvets force-pushed the add_randkey_for_krb_api_1225 branch from 2d19d1a to 77d0720 Compare February 9, 2026 09:09
async def modify_principal(
self,
principal_name: str,
new_principal_name: str | None = None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put запрос с full modify разве нет ? почему изменения опциональны ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

следовал из ТЗ, а так согласен, тут логичнее patch

m.shvets added 11 commits February 17, 2026 18:56
… related API endpoints to utilize these schemas for better data handling and validation.
…ests, update API endpoints to accept parameters directly for improved clarity and simplicity.
…API interactions

- Introduced new request models: AddPrincipalRequest, KtaddRequest, and ModifyPrincipalRequest for better structure and validation.
- Updated API endpoints to use the new request models, ensuring correct JSON structure for principal creation and keytab addition.
- Enhanced error handling and logging for keytab operations.
- Refactored existing methods to accommodate new parameters for encryption algorithms and random key generation.
…o improve parameter handling and request structure

- Modified the API endpoints for adding and renaming principals to align with new request models.
- Adjusted assertions in tests to reflect changes in the expected arguments for kadmin methods.
- Enhanced clarity by consolidating parameters in API requests.
…s to modify principal functionality

- Removed the rename_princ method from KAdminLocalManager and replaced it with modify_princ.
- Updated API endpoint from rename_principal to modify_principal to reflect the new naming convention.
- Adjusted related methods and error codes to use modify_principal terminology for consistency across the codebase.
…PI endpoints

- Eliminated the reset_principal_pw method from KerberosService and KerberosFastAPIAdapter.
- Removed the corresponding API endpoint for resetting principal passwords from krb5_router.
- Updated AuthorizationRules to reflect the removal of the KRB_RESET_PRINCIPAL_PW constant.
- Renamed `new_principal_name` to `new_name` in `ModifyPrincipalRequest` for clarity.
- Updated method signatures and API interactions to use the new parameter name across various classes and modules.
- Adjusted tests to reflect changes in the principal modification logic and method calls.
- Removed the ALGORITHM_MAP and the _parse_algorithms method to simplify algorithm processing.
- Updated add_princ and modify logic to directly use the algorithms parameter, enhancing clarity and reducing complexity.
- Adjusted related method calls to ensure consistent handling of algorithm parameters across principal modifications.
- Updated AddPrincipalRequest and KtaddRequest models for improved clarity in parameter handling.
- Simplified the add_principal and modify_principal methods to streamline algorithm and password processing.
- Changed logging level for missing base directories in update_krb5_config to warning for better visibility.
- Adjusted API interactions to ensure consistent naming conventions for principal parameters.
@Misha-Shvets Misha-Shvets force-pushed the add_randkey_for_krb_api_1225 branch from 299e57d to 25719bb Compare February 17, 2026 15:56
- Renamed KRBAPIRenamePrincipalError to KRBAPIModifyPrincipalError for consistency with modify principal functionality.
- Updated exception handling in KerberosService and ModifyRequest to reflect the new error class name.
- Adjusted imports across modules to ensure proper usage of the modified error class.
@rimu-stack rimu-stack changed the title Add randkey for krb api 1225 Add randkey for krb api Feb 19, 2026
@rimu-stack rimu-stack merged commit 96e344c into dev Feb 19, 2026
6 checks passed
@rimu-stack rimu-stack deleted the add_randkey_for_krb_api_1225 branch February 19, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants